<template>
  <s-layout title="提示" :bgStyle="{ color: '#FFF' }">
    <su-fixed bottom placeholder>
      <view class="footer-box ss-flex ss-row-between ss-p-20">
        <button
          class="add-btn ss-reset-button"
          @tap="sheep.$router.go('/pages/index/index')"
        >
          返回商城
        </button>
      </view>
    </su-fixed>
	
    <s-empty
      text="实名认证审核中，请耐心等待平台审核..."
      icon="/static/empty.png"
    />
  </s-layout>
</template>

<script setup>
  import { reactive, onBeforeMount } from 'vue';
  import { onShow } from '@dcloudio/uni-app';
  import sheep from '@/sheep';
  import { isEmpty } from 'lodash';

  const state = reactive({
    list: [],
    loading: true,
  });

  onShow(async () => {
    state.list = (await sheep.$api.user.address.list()).data;
    state.loading = false;
  });

  onBeforeMount(() => {
    if (!!uni.getStorageSync('areaData')) {
      return;
    }
    // 提前加载省市区数据
    sheep.$api.data.area().then((res) => {
      if (res.code === 1) {
        uni.setStorageSync('areaData', res.data);
      }
    });
  });
</script>

<style lang="scss" scoped>
  .footer-box {
    .add-btn {
      flex: 1;
      background: #252525;
      border-radius: 20rpx;
      font-size: 30rpx;
      font-weight: 500;
      line-height: 80rpx;
      color: $white;
      position: relative;
      z-index: 1;
    }
  }
</style>
